package com.naiterui.ehp.bp.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description drmessageConsultOder 实体
 * @author xuchong
 * @since 1.0
 */
@Entity
@Table(name = "dr_message_consult_order")
public class DrMessageConsultOrder implements Serializable {

    // 咨询中--会话状态
    public static final int CONSULT_SESSION_STATUS_BEGIN = 0;
    // 已结束--会话状态
    public static final int CONSULT_SESSION_STATUS_END = 1;

    // 未付费--付费状态(对应待支付，支付失败)
    public static final int MESSAGE_PAY_STATUS_NO = 0;
    // 已付费--付费状态(对应支付成功)
    public static final int MESSAGE_PAY_STATUS_YES = 1;

    /** 问诊记录支付状态：待支付 */
    public static final int CONSULT_ORDER_PAY_STATUS_WAIT = 1;
    /** 问诊记录支付状态：已支付 */
    public static final int CONSULT_ORDER_PAY_STATUS_YES = 2;

    /**
     * 字段或域定义：<code>serialVersionUID</code>
     */
    private static final long serialVersionUID = 2685153239504369276L;

    // 主键
    private Long id;

    /**
     * 订单号
     */
    private String orderSn;

    /**
     * 患者id
     */
    private Long patientId;

    /**
     * 医生id
     */
    private Long doctorId;

    /**
     * 支付金额(单位为分)
     */
    private Integer price;

    /**
     * 支付金额对应积分数
     */
    private Integer point;

    /**
     * 支付状态:1:待支付;2支付成功;3:支付失败;4:支付中;5:关闭5;6退款
     */
    private Integer payStatus;

    /**
     * 会话状态:0:咨询中;1:已结束
     */
    private Integer consultSessionStatus;

    /**
     * 会话id(mysql)
     */
    private Long consultSessionId;

    /**
     * 会话id(mongo)
     */
    private String sessionId;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 更新时间
     */
    private Date changedAt;

    /**
     * 更新人
     */
    private String changedBy;

    /**
     * 版本号
     */
    private Integer version;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "order_sn")
    public String getOrderSn() {
        return this.orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    @Column(name = "patient_id")
    public Long getPatientId() {
        return this.patientId;
    }

    public void setPatientId(Long patientId) {
        this.patientId = patientId;
    }

    @Column(name = "doctor_id")
    public Long getDoctorId() {
        return this.doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    @Column(name = "price")
    public Integer getPrice() {
        return this.price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    @Column(name = "point")
    public Integer getPoint() {
        return this.point;
    }

    public void setPoint(Integer point) {
        this.point = point;
    }

    @Column(name = "pay_status")
    public Integer getPayStatus() {
        return this.payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    @Column(name = "consult_session_status")
    public Integer getConsultSessionStatus() {
        return this.consultSessionStatus;
    }

    public void setConsultSessionStatus(Integer consultSessionStatus) {
        this.consultSessionStatus = consultSessionStatus;
    }

    @Column(name = "consult_session_id")
    public Long getConsultSessionId() {
        return this.consultSessionId;
    }

    public void setConsultSessionId(Long consultSessionId) {
        this.consultSessionId = consultSessionId;
    }

    @Column(name = "session_id")
    public String getSessionId() {
        return this.sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    @Column(name = "created_at")
    public Date getCreatedAt() {
        return this.createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Column(name = "created_by")
    public String getCreatedBy() {
        return this.createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Column(name = "changed_at")
    public Date getChangedAt() {
        return this.changedAt;
    }

    public void setChangedAt(Date changedAt) {
        this.changedAt = changedAt;
    }

    @Column(name = "changed_by")
    public String getChangedBy() {
        return this.changedBy;
    }

    public void setChangedBy(String changedBy) {
        this.changedBy = changedBy;
    }

    @Column(name = "version")
    public Integer getVersion() {
        return this.version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "DrMessageConsultOrder{" + "id=" + this.id + ", orderSn='" + this.orderSn + '\'' + ", patientId=" + this.patientId + ", doctorId="
                + this.doctorId + ", price=" + this.price + ", point=" + this.point + ", payStatus=" + this.payStatus + ", consultSessionStatus="
                + this.consultSessionStatus + ", consultSessionId=" + this.consultSessionId + ", sessionId='" + this.sessionId + '\'' + ", createdAt="
                + this.createdAt + ", createdBy='" + this.createdBy + '\'' + ", changedAt=" + this.changedAt + ", changedBy='" + this.changedBy + '\''
                + ", version=" + this.version + '}';
    }
}
